<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { onReady } from '@dcloudio/uni-app';
import { router } from '@/utils/tools';
import goodsCard from './goodsCard.vue';
import noneBox from '../../components/noneBox/noneBox.vue'

const props = defineProps({
  searchParams: {
    type: String,
    default: ''
  },
  leftList: {
    type: Array,
    default: () => []
  },
  rightLists: {
    type: Array,
    default: () => [],
  },
  isMore: {
    type: Boolean,
    default: false,
  }

});

const handleDetail = (row: any) => {
  router(`/pagesMerchand/stone-details?id=${row.id}`);

}


const getData = () => {

}
onLoad((options: any) => {
  // 初始化数据
  getData();

})
onReady(() => {
  //   getProductPage();
})
</script>

<template>
  <view class="wf flex">
    <view class="wf-left flex flex-1 flex-column">
      <!-- 瀑布流左边 -->
      <view v-for="(item, i) in leftList" :key="i" @click="handleDetail(item)" class="">
        <goodsCard :goodsData="item"> </goodsCard>
      </view>
    </view>
    <view class="flex wf-center"></view>
    <!-- 瀑布流右边   -->
    <view class="wf-right flex flex-1 flex-column">
      <view v-for="(item, i) in rightLists" :key="i" @click="handleDetail(item)" class="">
        <goodsCard :goodsData="item"> </goodsCard>
      </view>
    </view>
  </view>
  <noneBox v-if="rightLists.length <= 0 && leftList.length <= 0" />
  <uv-load-more height=45px status="nomore" fontSize="12px" nomoreText="人家也是有底线哒" :line="true" v-if="isMore" />
</template>

<style scoped lang="scss">
.wf {
  .wf-center {
    width: 20rpx;
  }

  .wf-left {
    overflow: hidden;
  }

  .wf-right {
    overflow: hidden;

  }
}
</style>
